Skip to content

Conversation

breskeby
Copy link
Contributor

This will be deprecated in later Gradle versions

@breskeby breskeby added >non-issue :Delivery/Build Build or test infrastructure :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts Team:Delivery Meta label for Delivery team auto-backport Automatically create backport pull requests when merged v9.2.0 v8.17.11 v8.18.6 v8.19.3 v9.1.4 v9.0.7 labels Aug 26, 2025
@breskeby breskeby self-assigned this Aug 26, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

}
}

['archives:windows-zip',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use it and its basically just some rewiring of configurations adding nothing but clutter to the build that can be avoided.

@breskeby breskeby requested a review from Copilot August 26, 2025 10:47
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the Gradle build configuration by replacing the deprecated archives configuration with the standard assemble task dependency pattern. This change prepares the codebase for future Gradle versions where the archives configuration will be removed.

  • Replaces artifacts { archives taskName } with tasks.named('assemble').configure { dependsOn taskName }
  • Removes legacy configuration setup for distribution subprojects
  • Maintains the same build behavior while using the recommended Gradle approach

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
x-pack/rest-resources-zip/build.gradle Updates restResourcesZip task to use assemble dependency instead of archives configuration
x-pack/plugin/security/build.gradle Updates jar task publishing to use assemble dependency instead of archives configuration
x-pack/plugin/ml/build.gradle Updates jar task publishing to use assemble dependency instead of archives configuration
distribution/build.gradle Removes legacy archives configuration setup for distribution subprojects
Comments suppressed due to low confidence (2)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

// normal es plugins do not publish the jar but we need to since users need it for extensions
archives tasks.named("jar")

tasks.named('assemble').configure {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

buildReleaseArtifacts relies on the assemble task. archives has been deprecated. see gradle/gradle#34001

Copy link
Contributor

@jozala jozala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@breskeby breskeby merged commit 818670d into elastic:main Aug 26, 2025
34 checks passed
breskeby added a commit to breskeby/elasticsearch that referenced this pull request Aug 26, 2025
* [Gradle] Avoid usage of archives configuration

This will be deprecated in later Gradle versions

* Remove unused wiring in distribution project

* minor tweak
breskeby added a commit to breskeby/elasticsearch that referenced this pull request Aug 26, 2025
* [Gradle] Avoid usage of archives configuration

This will be deprecated in later Gradle versions

* Remove unused wiring in distribution project

* minor tweak
breskeby added a commit to breskeby/elasticsearch that referenced this pull request Aug 26, 2025
* [Gradle] Avoid usage of archives configuration

This will be deprecated in later Gradle versions

* Remove unused wiring in distribution project

* minor tweak
breskeby added a commit to breskeby/elasticsearch that referenced this pull request Aug 26, 2025
* [Gradle] Avoid usage of archives configuration

This will be deprecated in later Gradle versions

* Remove unused wiring in distribution project

* minor tweak
breskeby added a commit to breskeby/elasticsearch that referenced this pull request Aug 26, 2025
* [Gradle] Avoid usage of archives configuration

This will be deprecated in later Gradle versions

* Remove unused wiring in distribution project

* minor tweak
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.17
9.1
9.0
8.18
8.19

elasticsearchmachine pushed a commit that referenced this pull request Aug 29, 2025
* [Gradle] Avoid usage of archives configuration

This will be deprecated in later Gradle versions

* Remove unused wiring in distribution project

* minor tweak
elasticsearchmachine pushed a commit that referenced this pull request Aug 29, 2025
* [Gradle] Avoid usage of archives configuration

This will be deprecated in later Gradle versions

* Remove unused wiring in distribution project

* minor tweak
elasticsearchmachine pushed a commit that referenced this pull request Aug 29, 2025
* [Gradle] Avoid usage of archives configuration

This will be deprecated in later Gradle versions

* Remove unused wiring in distribution project

* minor tweak
elasticsearchmachine pushed a commit that referenced this pull request Aug 29, 2025
* [Gradle] Avoid usage of archives configuration

This will be deprecated in later Gradle versions

* Remove unused wiring in distribution project

* minor tweak
elasticsearchmachine pushed a commit that referenced this pull request Sep 4, 2025
* [Gradle] Avoid usage of archives configuration

This will be deprecated in later Gradle versions

* Remove unused wiring in distribution project

* minor tweak
sarog pushed a commit to portsbuild/elasticsearch that referenced this pull request Sep 11, 2025
…tic#133568)

* [Gradle] Avoid usage of archives configuration

This will be deprecated in later Gradle versions

* Remove unused wiring in distribution project

* minor tweak
sarog pushed a commit to portsbuild/elasticsearch that referenced this pull request Sep 19, 2025
…tic#133568)

* [Gradle] Avoid usage of archives configuration

This will be deprecated in later Gradle versions

* Remove unused wiring in distribution project

* minor tweak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged :Delivery/Build Build or test infrastructure :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts >non-issue Team:Delivery Meta label for Delivery team v8.17.11 v8.18.7 v8.19.4 v9.0.7 v9.1.4 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants